/*
 * SonarQube
 * Copyright (C) 2009-2021 SonarSource SA
 * mailto:info AT sonarsource DOT com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
.portfolio-overview > h1 {
  font-weight: normal;
}

.portfolio-overview > .page-actions {
  margin-bottom: 0;
}

.portfolio-measure-secondary-value {
  line-height: var(--controlHeight);
  font-size: 18px;
  font-weight: 300;
}

.portfolio-grid {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.portfolio-grid > li {
  vertical-align: top;
  width: 50%;
  text-align: center;
}

.portfolio-grid > li.text-middle {
  vertical-align: middle;
}

.portfolio-freshness {
  line-height: var(--controlHeight);
  white-space: nowrap;
}

.portfolio-description {
  max-width: 60%;
}

.portfolio-boxes {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  margin-bottom: 20px;
  padding: 15px 0;
  width: 100%;
}

.portfolio-box {
  flex: 1 0 10%;
  position: relative;
  padding: 0 calc(2 * var(--gridSize)) 66px;
  margin: 0 var(--gridSize);
  border: 1px solid var(--barBorderColor);
  background-color: #fff;
  box-sizing: border-box;
}

.portfolio-box:first-child {
  margin-left: 0;
}

.portfolio-box:last-child {
  margin-right: 0;
}

.portfolio-box-title {
  padding: var(--gridSize) 0 calc(2 * var(--gridSize));
  margin: var(--gridSize) 0 calc(2 * var(--gridSize));
  font-size: var(--bigFontSize);
  line-height: var(--bigFontSize);
  border-bottom: 1px solid var(--barBorderColor);
  white-space: nowrap;
}

.portfolio-box-title > .button-small > svg {
  margin-top: 0;
}

.portfolio-box > h3 {
  color: var(--secondFontColor);
  font-size: 12px;
  font-weight: normal;
  margin-top: var(--gridSize);
}

.portfolio-box-rating,
.portfolio-box-rating .rating {
  display: block;
  width: 80px;
  height: 80px;
  line-height: 80px;
}

.portfolio-box-rating {
  margin: calc(2 * var(--gridSize)) auto;
  border: none;
}

.portfolio-box-rating .rating {
  border-radius: 80px;
  font-size: 48px;
  text-align: center;
}

.portfolio-box-rating .rating.no-rating {
  color: var(--secondFontColor);
  font-size: var(--bigFontSize);
}

.portfolio-box-links {
  border-top: 1px solid var(--barBorderColor);
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.portfolio-box-links > div {
  display: inline-block;
  padding: calc(1.5 * var(--gridSize)) 0;
  width: 50%;
  box-sizing: border-box;
}

.portfolio-box-links > div:first-child {
  border-right: 1px solid var(--barBorderColor);
}

.portfolio-box-links svg,
.portfolio-breakdown-box-link svg {
  vertical-align: middle;
}

.portfolio-breakdown {
  display: flex;
}

.portfolio-breakdown-box {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  background-color: white;
  border: 1px solid var(--barBorderColor);
  margin: var(--gridSize) 0 calc(2 * var(--gridSize));
}

.portfolio-breakdown-box + .portfolio-breakdown-box {
  margin-left: calc(2 * var(--gridSize));
}

.portfolio-breakdown-box h2,
.portfolio-breakdown-box .portfolio-breakdown-metric {
  margin: var(--gridSize) calc(2 * var(--gridSize)) 0;
}

.portfolio-breakdown-box-link {
  margin-top: calc(2 * var(--gridSize));
  border-top: 1px solid var(--barBorderColor);
  padding: calc(2 * var(--gridSize));
}

.portfolio-sub-components table.data th {
  font-size: var(--baseFontSize);
  text-transform: none;
  vertical-align: middle;
}

.portfolio-sub-components-cell {
  width: 110px;
}

.portfolio-meta-header {
  margin-bottom: calc(0.5 * var(--gridSize));
  color: var(--baseFontColor);
}

.portfolio-meta-card {
  min-width: 200px;
  box-sizing: border-box;
}

.portfolio-meta-card + .portfolio-meta-card {
  margin-top: calc(2 * var(--gridSize));
  padding-top: calc(2 * var(--gridSize) - 1px);
  border-top: 1px solid var(--barBorderColor);
}
